home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 January / PCWorld_2005-01_cd.bin / software / topware / winamp / winamp507_full.exe / $R0 / Winamp Modern / mute.maki (.txt) < prev    next >
Winamp Compiled Maki Script  |  2004-07-01  |  3KB  |  119 lines

  1. /* Note: a decompiler is no invitation to steal code.
  2.    Please respect the the copyright */
  3.  
  4. #include "std.mi"
  5. Global Group Group16;
  6. Global ToggleButton ToggleButton17;
  7. Global ToggleButton ToggleButton18;
  8. Global Timer Timer19;
  9. Global Text Text20;
  10. Global Float Float21;
  11. Global Boolean Boolean22;
  12. Global Boolean Boolean23;
  13. Global Layer Layer24;
  14. Global Timer Timer25;
  15.  
  16.  
  17. System.onScriptLoaded()
  18. {
  19. Group16 = System.getScriptGroup();
  20. ToggleButton17 = Group16.findObject(( "mute"));
  21. Timer25 = ( new Timer);
  22. Timer25.setDelay(5);
  23. Timer25.start();
  24. Text20 = Group16.findObject(( "songticker"));
  25. Layer24 = Group16.findObject(( "volumebar"));
  26. Layer24.setXmlParam(( "w"), System.integerToString(( ( ( System.getVolume() / 255) * 70) + 5)));
  27. Timer19 = ( new Timer);
  28. Timer19.setDelay(1000);
  29. Boolean22 = 0;
  30. Boolean23 = 0;
  31. return Null;
  32. }
  33.  
  34. System.onScriptUnloading()
  35. {
  36. delete Timer25;
  37. return Null;
  38. }
  39.  
  40. Timer25.onTimer()
  41. {
  42. ToggleButton18 = System.getContainer(( "main")).getLayout(( "shade")).findObject(( "shademute"));
  43. if(( ToggleButton18 != Null)) {
  44. Timer25.stop();
  45. }
  46. return Null;
  47. }
  48.  
  49. Timer19.onTimer()
  50. {
  51. Text20.setText(( ""));
  52. Timer19.stop();
  53. return Null;
  54. }
  55.  
  56. ToggleButton17.onLeftClick()
  57. {
  58. Boolean23 = 1;
  59. if(( ! Boolean22)) {
  60. Float21 = System.getVolume();
  61. System.setVolume(0);
  62. Boolean22 = 1;
  63. Timer19.start();
  64. Text20.setText(( "Mute\ ON"));
  65. ToggleButton18.setActivated(1);
  66. } else {
  67. System.setVolume(Float21);
  68. Boolean22 = 0;
  69. Timer19.start();
  70. Text20.setText(( "Mute\ OFF"));
  71. ToggleButton18.setActivated(0);
  72. }
  73. return Null;
  74. }
  75.  
  76. ToggleButton18.onLeftClick()
  77. {
  78. Boolean23 = 1;
  79. if(( ! Boolean22)) {
  80. Float21 = System.getVolume();
  81. System.setVolume(0);
  82. Boolean22 = 1;
  83. Timer19.start();
  84. Text20.setText(( "Mute\ ON"));
  85. ToggleButton17.setActivated(1);
  86. } else {
  87. System.setVolume(Float21);
  88. Boolean22 = 0;
  89. Timer19.start();
  90. Text20.setText(( "Mute\ OFF"));
  91. ToggleButton17.setActivated(0);
  92. }
  93. return Null;
  94. }
  95.  
  96. System.onScriptUnloading()
  97. {
  98. delete Timer19;
  99. return Null;
  100. }
  101.  
  102. System.onVolumeChanged(int newvol)
  103. {
  104. Layer24.setXmlParam(( "w"), System.integerToString(( ( ( newvol / 255) * 70) + 5)));
  105. if(( ! Boolean23)) {
  106. Timer19.start();
  107. Text20.setText(( ( ( "Volume\:") + System.integerToString(( newvol / ( 2.54999995231628)))) + ( "\%")));
  108. if(Boolean22) {
  109. ToggleButton17.setActivated(0);
  110. ToggleButton18.setActivated(0);
  111. Boolean22 = 0;
  112. }
  113. }
  114. Boolean23 = 0;
  115. return Null;
  116. }
  117.  
  118.  
  119.